package com.example.designpatterns.behavioral.strategy;

import com.example.designpatterns.behavioral.strategy.commons.Payment;
import com.example.designpatterns.behavioral.strategy.entity.Order;
import lombok.extern.slf4j.Slf4j;

/**
 * 客户端代码（具体使用）
 *
 * @author scott
 */
@Slf4j
public class Client {

    public static void main(String[] args) {
        Order order = new Order("1", "1234567890000", 600);

        log.info("默认支付：{}", order.pay().toString());
        log.info("支付宝支付方式：{}", order.pay(Payment.ALI_PAY).toString());
        log.info("京东支付方式：{}", order.pay(Payment.JD_PAY).toString());
        log.info("微信支付方式：{}", order.pay(Payment.WECHAT_PAY).toString());
        log.info("银联支付方式：{}", order.pay(Payment.UNION_PAY).toString());
    }

}
